package lanxing.future.base.chapter5;

/**
 * @author <a href="mailto:lanxing@chances.com.cn">lanxing</a>
 * @version 2019年3月15日
 *
 */
public class TestEnum {
    public static void main(String[] args) {
        System.out.println(MoneyEnum.ONE);
        
        System.out.println(MoneyEnum.ONE.toString() == "one");
        
        System.out.println(MoneyEnum.HUNDRED);
        
        MoneyEnum key = MoneyEnum.ONE;
        switch (key) {
        case ONE:
            System.out.println("1 块钱");
            break;
        case HUNDRED:
            System.out.println("100 块钱");
            break;
        default:
            break;
        }
        
        testArgs(1d, new Integer[] {new Integer(5),8,2});
    }
    
    public static void testArgs(double d,Integer... args) {
        for(Integer arg:args) {
            System.out.print(arg+",");
        }
    }
    
    public void testArgs(float f,Integer...integers) {
        System.out.println("test");
    }

}
